import { stringify } from 'qs';
import request from '@/utils/request';

import webpath from '@/utils/webpath';

export async function deleteByPrimaryKeyForProOperlog(params = {}) {
    return request(`/${webpath}/web/api/service/prooperlog/delete?${stringify(params)}`);
}


export async function selectByPrimaryKeyForProOperlog(params = {}) {
    return request(`/${webpath}/web/api/service/prooperlog/get?${stringify(params)}`);
}


export async function insertForProOperlog(params = {}) {
    return request(`/${webpath}/web/api/service/prooperlog/insert`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function updateForProOperlog(params = {}) {
    return request(`/${webpath}/web/api/service/prooperlog/update`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function deleteByMapForProOperlog(params = {}) {
    return request(`/${webpath}/web/api/service/prooperlog/deleteByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateByMapForProOperlog(params = {}) {
    return request(`/${webpath}/web/api/service/prooperlog/updateByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function getOneForProOperlog(params = {}) {
    return request(`/${webpath}/web/api/service/prooperlog/getOne`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}



export async function getAllForProOperlog(params = {}) {
    return request(`/${webpath}/web/api/service/prooperlog/getAll`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function queryPageForProOperlog(params = {}) {
    return request(`/${webpath}/web/api/service/prooperlog/queryPage`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function countForProOperlog(params = {}) {
    return request(`/${webpath}/web/api/service/prooperlog/count`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function insertBatchForProOperlog(params = {}) {
    return request(`/${webpath}/web/api/service/prooperlog/insertBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function deleteBatchForProOperlog(params = {}) {
    return request(`/${webpath}/web/api/service/prooperlog/deleteBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateBatchForProOperlog(params = {}) {
    return request(`/${webpath}/web/api/service/prooperlog/updateBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}